/*
 * ExpSample.java
 *
 * Created on April 1, 2006, 4:33 PM
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package Experience;

import java.util.Vector;
import javax.microedition.lcdui.Image;

/**
 *
 * @author dmgreen
 */
public class ExpSample extends BaseSample {
    
    private Vector  myImages;    
    private Vector  myAudioClips;
    
    private int[]  myMealDescriptor;
    private int[]  myExerciseDescriptor;
    
    private String myActivityType;
    
    
    
    // will keep track of the audio clips recoreded in this sample
    
    /** Creates a new instance of ExpSample */
    public ExpSample() {
        super();
        
        myImages     = new Vector();
        myAudioClips = new Vector();
        
        myMealDescriptor = new int[3];
        myExerciseDescriptor = new int[2];
        
        myActivityType   = "";          
    }
    
    public void addAudioClip(byte[] audio_data) {
        myAudioClips.addElement(audio_data);
    }
         
    public void deleteLastAudio() {
        if (myAudioClips.size() > 0) {
            myAudioClips.removeElementAt(myAudioClips.size()-1);
        }
    }
    
    public void deleteLastImage() {
        if (myImages.size() > 0) {
            myImages.removeElementAt(myImages.size()-1);
        }
    }
    
    public void addImage(byte[] image_data) {
        myImages.addElement(image_data);
    }
    
    public void setMealDescriptor(int[] meal_descriptor) {
        myMealDescriptor = meal_descriptor;
    }
    
    public int[] getMealDescriptor() {
        return myMealDescriptor;
    }
    
    public void setExerciseDescriptor(int[] exercise_descriptor) {
        myExerciseDescriptor = exercise_descriptor;
    }
    
    public int[] getExerciseDescriptor() {
        return myExerciseDescriptor;
    }
    
    public void setActivityType(String activity_type) {
        myActivityType = activity_type;
    }
    
    public String getActivityType() {
        return myActivityType;
    }
        
    public Vector getImages() {
        return myImages;
    } 
    
    public Vector getAudioClips() {
        return myAudioClips;
    }

    public String getType() {
        return "Experience";
    }
}
